|
This page last changed on Jan 22, 2007 by rosie@atlassian.com.
You need to edit in 'Wiki Markup' mode to include macros in your page.
The Contentbylabel macro lists content associated with specific labels.
Contentbylabel Macro
| What you need to type |
What you will get |
| {contentbylabel:documentation, my:stuff} |
Bamboo Documentation Home
(Bamboo)
Labels: documentation
|
Character encodings in Confluence
(Confluence)
Labels: documentation, internal, http, database, confluence, utf8, unicode, encoding, character
|
Client Configuration
(Crowd)
Labels: integration, documentation, crowd, authentication, api
|
Concepts
(Crowd)
Labels: overview, guide, documentation, crowd
|
Configuring Crowd
(Crowd)
Labels: overview, api, crowd, documentation, guide
|
|
By default, Confluence lists all the labels for each result displayed. See optional parameters below to disable this.
Recommended Default Usage
To display all pages with the label needs-fixing, use:
{contentbylabel:needs-fixing|showLabels=false|maxResults=99|showSpace=false}
Optional Parameters
| No |
parameter |
Default |
Description |
| 1 |
key |
all |
Filter by space (Keywords @all and @self available with Confluence 2.2.2 and higher) |
| 2 |
type |
false |
Filter by content type |
| 3 |
showLabels |
true |
Show or hide labels for results |
| 4 |
showSpace |
true |
Show or hide spaces for results |
| 5 |
excerpt |
false |
Show or hide excerpts for results |
| 6 |
maxResults |
5 |
Specify maximum results to display |
| 7 |
sort=creation
sort=title
sort=modified |
recent |
The 'sort' attribute is an optional attribute that allows you to configure how the children are sorted. Use the 'reverse' attribute to optionally reverse the sorting. |
1. Filter by space
{contentbylabel:dogs,cats|key=PETS}
2. Show only results in current space (Confluence 2.2.2 and higher)
{contentbylabel:dogs,cats|key=@self}
3. Show results from all spaces (Confluence 2.2.2 and higher)
{contentbylabel:dogs,cats|key=@all}
4. Filter by content type: pages or blog posts
{contentbylabel:dogs,cats|type=page,blogpost}
5. Hide labels for results
{contentbylabel:dogs,cats|showLabels=false}
6. Hide spaces for results
{contentbylabel:dogs,cats|showSpace=false}
7. Display excerpts for results
{contentbylabel:dogs,cats|excerpt=true}
8. Specify the maximum number of results to display
{contentbylabel:dogs,cats|maxResults=99}
9. Sort by creation date, modification date or title
{children|sort=creation|reverse=true}
RELATED TOPICS
Related Labels Macro
Navmap Macro
Recently Used Labels Macro
Working with Labels Overview
Working with Macros
Take me back to Confluence 2 Home
|
it appears that contentbylabel is limited to show max 5 entries - any way to change that value?

Posted by keepthebyte at Jan 13, 2006 04:58
|
|
There is an undocumented parameter: maxResults. Why the default is 5 is strange. The default should be all.

Posted by bob.swift@charter.net at Jan 13, 2006 07:55
|
|
Are there more undocumented parameters? I'm looking for a way to get a sorted result-list.
| No content found for label(s) outlook2003. |
does work as it should, however, if i append |sort=title it won't. Any clues?

Posted by muellerj at Jan 13, 2006 09:36
|
|
Doesn't look like it. I should have said, not documented here. The notation guide shows the maxresults parameter.

Posted by bob.swift@charter.net at Jan 13, 2006 10:20
|
|
If you want more options, such as those found on the {children} macro, please vote for this JIRA issue and add any additional parameters that are required: http://jira.atlassian.com/browse/CONF-5137

Posted by gfraser at Jan 14, 2006 09:59
|
|
Bob,
Thanks for pointing that out. I have included it now.
Cheers,
Vidya

Posted by vidya at Jan 15, 2006 16:35
|
|
Is there hidden option to filter by multiple labels? blog-posts macro has "match-labels=all" option, but from some reason blog-posts won't work if page is included, but this macro works.

Posted by ajevic at Feb 06, 2006 06:32
|
|
excerpt=true does not seem to work for blogpost. The content is not shown. Pls anyone confirm this?

Posted by cychiam at Sep 12, 2006 01:22
|
|
Hi, If this macro can display the title of a page, it can also display the author of the page ?
Is there a way to do that ? ...
'Cause i can't find the source code of this macro /:

Posted by gludenglu at Oct 23, 2006 06:21
|
|
Showing excerpts doesn't seem to be working for me. Does it work? Does the page itself need something done to it to display the excerpt?

Posted by hork at Nov 01, 2006 13:44
|
|
Is there a way to specify that you want to list all the pages in the space that *don't* have a label?
I'd like to make a page that lists all the other pages in the space that don't have labels.

Posted by hork at Nov 01, 2006 13:46
|
|
I guess the page has to have an excerpt defined for it to display. There is an excerpt macro that needs to be used on the page to define the excerpt that will show up.

Posted by hork at Nov 01, 2006 13:54
|
|
I'd like to specify AND syntax for choosing pages that have label "A" and label "B". There should be a standard way to filter pages that is used in Unable to render {include} No page title provided and
| No content found for label(s) . |
and any other macros that select pages.

Posted by tony.marshall@citigroup.com at Nov 15, 2006 09:37
|
|
Re-written to display properly.
I'd like to specify AND syntax for choosing pages that have label "A" and label "B". There should be a standard way to filter pages that is used in {include} and {contentByLabel}and any other macros that select pages.

Posted by tony.marshall@citigroup.com at Nov 15, 2006 09:39
|
|
I have the below code written for my macro but it still shows the space in the results for the label. What am i doing wrong?

Posted by jguthrie at Dec 07, 2006 18:02
|
|
Also wanted to let you know, 'modification' should actually be 'modified' for the sort criteria...

Posted by jguthrie at Dec 07, 2006 18:42
|
|
Can this label be improved or have a variable that automatically detects the labels that are on the page and organizes content by them without the user needing to put the label in. (labels changing etc...) Last comment, sorry to all who are watching this page. :$

Posted by jguthrie at Dec 07, 2006 19:15
|
|
Is there an option to show time since last modified?
Ronnie

Posted by ronnie chan at Dec 27, 2006 17:56
|
|
I second that, is there any information how AND-filtering by several labels is possible ?

Posted by christian.hansen@oenb.at at Jan 18, 2007 03:23
|
|
Fixed - thank you very much.

Posted by rosie@atlassian.com at Jan 22, 2007 18:19
|
|
Feedback on improving this piece of documentation (or any other) is much appreciated; but to ensure a quick response to questions and about using Confluence, please visit the Forums or log a support call. If you have a suggestion about improving Confluence, please vote for relevant issues in the Confluence project, or log a new issue if appropriate.

Posted by rosie@atlassian.com at Jan 22, 2007 18:38
|
|